package com.example.demo.aop.redis;

import redis.clients.jedis.Jedis;

/**
 * @author 许路路
 */
public class RedisProduct {


    public static void main(String[] args) {
        Jedis jedisUtils = JedisUtils.getJedis();
        while (true) {
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            String value = "" + System.currentTimeMillis();
            Long res = jedisUtils.lpush(JedisUtils.TEST_KEY, value);
            System.out.println("生产者生产:" + value + ",返回：" + res);
        }
    }
}
